﻿using DFGK_WMS.Model.DTO;
using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.IRepository
{
    public interface ITTransferBinOrderDetailRepository:IBaseRepository<TTransferBinOrderDetail>
    {
        /// <summary>
        /// 添加移库单明细
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        bool AddTransferBinOrderDetails(TTransferBinOrderDetail obj);
        /// <summary>
        /// 查询所有移库单明细
        /// </summary>
        /// <param name="orderId">移库单id</param>
        /// <param name="kid"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<TTransferBinOrderDetail> GetTransferBinOrderDetailsList(int orderId, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 删除移库单明细
        /// </summary>
        /// <param name="tid"></param>
        /// <returns></returns>
        bool DelTransferBinOrderDetails(int tid);

        /// <summary>
        /// 修改移库单明细
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        bool UpdateTransferBinOrderDetails(TTransferBinOrderDetail t);
        /// <summary>
        /// 分类物料信息
        /// </summary>
        /// <returns></returns>
        public List<MaterialCategory> GetMaterialHierarchy(int? typeId);
        /// <summary>
        /// 查物料信息模糊
        /// </summary>
        /// <param name="typeId"></param>
        /// <returns></returns>
        public List<TMaterial> GetMaterials(string? name);
        /// <summary>
        /// 根据分类查物料
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>

        public List<TMaterial> GetParentTMaterial(int id);
        /// <summary>
        /// 显示仓位信息
        /// </summary>
        /// <returns></returns>
        public List<DtoTCell> GetCells();
        /// <summary>
        /// 递归字段
        /// </summary>

        public class MaterialInfo
        {
            public int Id { get; set; }
            public string Name { get; set; }
        }

        public class MaterialCategory
        {
            public int CategoryId { get; set; }
            public string CategoryName { get; set; }
            public List<MaterialInfo> Materials { get; set; }
        }





    }
}
